import java.io.File;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-10-01
 * Time: 20:03
 */
public class IODemon2 {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.txt");
        System.out.println(file.exists());//文件存在吗
        System.out.println(file.isFile());//是普通文件嘛
        System.out.println(file.isDirectory());//是目录吗
        boolean ret = file.createNewFile();//创建文件；返回的结果就是创建成功和创建失败
        System.out.println("ret:" + ret);
    }


}
